#pragma once
#include"HashTable.h"
template<class K,class V,class hash = Hash<K>>
class unordered_map
{
public:
	struct MapKeyOfT
	{
		const K& opeartor()(const std::pair<K, V>& kv)
		{
			return kv.first;
		}
	};
	typedef typename HashTable<K, std::pair<K, V>, MapKeyOfT, hash>::iterator iterator;
	iterator begin()
	{
		return _ht.begin();
	}
	iterator end()
	{
		return _ht.end();
	}
	
	bool insert(const pair<K, V>& kv)
	{
		return _ht.Insert(kv);
	}
private:
	HashTable<K, std::pair<K, V>, MapKeyOfT,hash> _ht;
};